package com.chen.auth.bestmanage.utils;

/**
 * ClassName:ResultTools
 * Package:com.chen.auth.bestmanage.utils
 * Description:
 * 返回体构造工具
 * @date:2021/9/17 上午1:02
 * @author:陈国松
 */
public class ResultTools {
    public static JsonResult success() {
        return new JsonResult(true);
    }

    public static <T> JsonResult<T> success(T data) {
        return new JsonResult(true, data);
    }

    public static JsonResult fail() {
        return new JsonResult(false);
    }

    public static JsonResult fail(ResultCode resultEnum) {
        return new JsonResult(false, resultEnum);
    }
}
